<?php

class taskView extends View {

	function __construct(){
		parent::__construct();
	}

	public function showAddTask() {
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/status_json.tpl');
		}
		else {
			$this->setTemplate('task/status.tpl');
		}
		$this->show();
	}

	public function showUploadedImage() {
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/status_json.tpl');
		}
		else {
			$this->setTemplate('task/status.tpl');
		}
		$this->show();
	}

	public function showGetTasks() {
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/get_json.tpl');
		}
		else {
			$this->setTemplate('task/get.tpl');
		}

		$this->show();
	}

	public function showGetUserTasks() {
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/getusertasks_json.tpl');
		}
		else {
			$this->setTemplate('task/getusertasks.tpl');
		}

		$this->show();
	}

	public function showUsersTasksCount() {
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/getuserstaskscount_json.tpl');
		}
		else {
			$this->setTemplate('task/getuserstaskscount.tpl');
		}

		$this->show();
	}

	public function showUpdateTask() {
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/updatestatus_json.tpl');
		}
		else {
			$this->setTemplate('task/updatestatus.tpl');
		}
		$this->show();
	}

	public function showDeleteTask() {
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/status_json.tpl');
		}
		else {
			$this->setTemplate('task/status.tpl');
		}
		$this->show();
	}

	public function showTaskActionStatus() {
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/status_json.tpl');
		}
		else {
			$this->setTemplate('task/status.tpl');
		}
		$this->show();
	}

	public function showGetUserDoneTasks()
	{
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/getuserdonetasks_json.tpl');
		}
		else {
			$this->setTemplate('task/getuserdonetasks.tpl');
		}

		$this->show();
	}

	public function showChangeTaskOrder() {
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/status_json.tpl');
		}
		else {
			$this->setTemplate('task/status.tpl');
		}
		$this->show();
	}

	public function showGetStatusList() {
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/getstatuslist_json.tpl');
		}
		else {
			$this->setTemplate('task/getstatuslist.tpl');
		}

		$this->show();
	}

	public function showDeleteTaskImage() {
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/status_json.tpl');
		}
		else {
			$this->setTemplate('task/status.tpl');
		}
		$this->show();
	}

	public function showGetUserDoneTasksInPrj()
	{
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/getusertasksinprj_json.tpl');
		}
		else {
			$this->setTemplate('task/getusertasksinprj.tpl');
		}

		$this->show();
	}

	public function showMoveTask() {
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/status_json.tpl');
		}
		else {
			$this->setTemplate('task/status.tpl');
		}
		$this->show();
	}

	public function showGetUserNotifications() {
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('task/getnotifications_json.tpl');
		}
		else {
			$this->setTemplate('task/getnotifications.tpl');
		}

		$this->show();
	}
}
?>